From: Florian Müllner Date: Tue, 17 Feb 2015 02:40:25 +0000 (+0100) Subject: autorunManager: Provide a createBanner() implementation X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1705 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=30c6e541f15bb35d958c46939261672a0dca4f55;p=gnome-shell.git autorunManager: Provide a createBanner() implementation Hotplug notifications use custom notification banners to include application icons in buttons. Bring those back by providing an appropriate createBanner() implementation. --- diff --git a/js/ui/components/autorunManager.js b/js/ui/components/autorunManager.js index 59f5a048d..f8b79d89a 100644 --- a/js/ui/components/autorunManager.js +++ b/js/ui/components/autorunManager.js @@ -326,15 +326,21 @@ const AutorunNotification = new Lang.Class({ this._manager = manager; this._mount = source.mount; - source.apps.forEach(Lang.bind(this, function (app) { + // set the notification to urgent, so that it expands out + this.setUrgency(MessageTray.Urgency.CRITICAL); + }, + + createBanner: function() { + let banner = new MessageTray.NotificationBanner(this); + + this.source.apps.forEach(Lang.bind(this, function (app) { let actor = this._buttonForApp(app); if (actor) - this.addButton(actor); + banner.addButton(actor); })); - // set the notification to urgent, so that it expands out - this.setUrgency(MessageTray.Urgency.CRITICAL); + return banner; }, _buttonForApp: function(app) { @@ -352,6 +358,7 @@ const AutorunNotification = new Lang.Class({ let button = new St.Button({ child: box, x_fill: true, x_align: St.Align.START, + x_expand: true, button_mask: St.ButtonMask.ONE, style_class: 'hotplug-notification-item button' });